#ifndef CHAPTER14_PERSON_H_
#define CHAPTER14_PERSON_H_

#include <string>
using namespace std;

class Person
{
private:
	string firstname;
	string lastname;
protected:
	virtual void Data() const;
	virtual void Get();
public:
	Person():firstname("NULL"),lastname("NULL") {}
	Person(const string & s1, const string & s2):
		firstname(s1),lastname(s2) {}
	virtual ~Person() = 0;		//pure virtual function
	virtual void Set() = 0;
	virtual void Show()= 0;
};

class Gunslinger :virtual public Person
{
private:
	int counts;
	double gunTime;
protected:
	void Data() const;
	void Get();
public:
	Gunslinger():Person(),counts(0),gunTime(0.0) {}
	Gunslinger(const string & s1, const string & s2, int a=0, double b=0.0)
		:Person(s1,s2), counts(a), gunTime(b) {}
	Gunslinger(const Person & p, int a=0, double b = 0.0)
		:Person(p), counts(a), gunTime(b) {}
	void Show();
	double Draw() { return gunTime; }
	void Set();
};

class PokerPlayer:virtual public Person
{
protected:
	void Data() const;
	void Get();
public:
	PokerPlayer():Person() {}
	PokerPlayer(const string & s1, const string & s2):Person(s1, s2) {}
	PokerPlayer(const Person & p): Person(p) {}
	int Draw();
	void Show();
	void Set();
};

class BadDude : public Gunslinger, public PokerPlayer
{
protected:
	void Data() const;
	void Get();
public:
	BadDude() {}
	BadDude(const string & s1, const string & s2, int a = 0, double b = 0.0):
		Person(s1,s2), Gunslinger(s1,s2,a,b), PokerPlayer(s1,s2) {}
	BadDude(const Gunslinger & gl):
		Person(gl), Gunslinger(gl), PokerPlayer(gl) {}
	BadDude(const PokerPlayer & pp,int a,double b):
		Person(pp), Gunslinger(pp,a,b),PokerPlayer(pp) {}
	double Gdraw() { return Gunslinger::Draw(); }
	int Cdraw();
	void Show();
	void Set();
};

#endif // !CHAPTER14_PERSON_H_
